﻿using System;
using Tasks247.Data;
using Tasks247.Views;

namespace Tasks247
{
    class Program
    {
        static void Main(string[] args)
        {
            ITasksRepository repository = new TasksContext();

            while (true)
            {
                //Console.Clear();
                Console.WriteLine("(C)reate, (R)ead, (U)pdate, (D)elete");

                switch (Console.ReadKey(true).KeyChar)
                {
                    case 'C':
                        new CreateTaskView(repository);
                        break;
                    case 'R':
                        new TasksView(repository);
                        break;
                    case 'U':
                        new UpdateTaskView(repository);
                        break;
                    case 'D':
                        new DeleteTaskView(repository);
                        break;
                }

            }



        }
    }
}
